<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="__ADMIN__/css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="__ADMIN__/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="__ADMIN__/css/style.css" rel="stylesheet" type="text/css" />
    <link href="__ADMIN__/lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="__COMMON__/js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layer/2.1/layer.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/H-ui.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/H-ui.admin.js"></script>
    <title>危险源管控</title>
    <style>
        *{margin: 0;padding: 0;}
        .qdxw{ margin:20px 30px;}
        .qdxw ul a{font-family: '微软雅黑';font-size: 18px;color: #333;text-decoration: none;}

        #desc {
            height: 46px;
            width: 472px;
        }
        #deal {
            height: 48px;
            width: 472px;
        }

    </style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 管控列表 <span class="c-gray en">&gt;</span> 危险源管控 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<br>
<form action="" method="post" class="form form-horizontal" enctype="multipart/form-data">
    <div class="qdxw">
        <table style="width: 100%; height: 380px;">
            <tr>
                <td style="border-style: inset; font-family: 黑体;">编号</td>
                <td class="auto-style1" style="border-style: inset; font-family: 黑体;">风险点名称</td>
                <td style="border-style: inset; font-family: 黑体;">危险源名称</td>
                <td style="border-style: inset; font-family: 黑体;">风险等级</td>
                <td style="border-style: inset; font-family: 黑体;">管控措施</td>
                <td style="border-style: inset; font-family: 黑体;">管控层级</td>
                <td class="auto-style2" style="border-style: inset; font-family: 黑体;">排查周期</td>
                <td style="border-style: inset; font-family: 黑体;">责任人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
            </tr>
            <tr>
                <td style="border-style: inset; font-family: 黑体;">&nbsp; 1</td>
                <!--     <td class="auto-style1" style="border-style: inset; font-family: 黑体;"><{$info['danger_id']}></td>-->
                <td style="border-style: inset; font-family: 黑体;"><{$danger['name']}></td>
                <td style="border-style: inset; font-family: 黑体;"><{$info['name']}></td>
                <td style="border-style: inset; font-family: 黑体;"><{$info['danger_level_id']}></td>
                <td style="border-style: inset; font-family: 黑体;"><{$info['engineering_method']}></td>
                <td style="border-style: inset; font-family: 黑体;">

                    <if condition="$info['object_level_id'] == 1">公司级
                        <elseif condition="$info['object_level_id'] == 2"/>专业级
                        <elseif condition="$info['object_level_id'] == 3"/>车间级
                        <elseif condition="$info['object_level_id'] == 4"/>班组级
                        <elseif condition="$info['object_level_id'] == 5"/>岗位级
                    </if>
                    <!--    <{$info['object_level_id']}>-->
                </td>
                <td class="auto-style2" style="border-style: inset; font-family: 黑体;">

                    <if condition="$info['object_level_id'] == 1">每月
                        <elseif condition="$info['object_level_id'] == 2"/>每旬
                        <elseif condition="$info['object_level_id'] == 3"/>每周
                        <elseif condition="$info['object_level_id'] == 4"/>每日
                        <elseif condition="$info['object_level_id'] == 5"/>每日
                    </if>

                </td>
                <td style="border-style: inset; font-family: 黑体;">


                    <volist name="zerenrens" id="sub">
                        <li class="li2"> <{$sub['level_id']}>级责任人 ：  <{$sub['username']}></li>
                    </volist>


                </td>
            </tr>
            <tr>
                <td rowspan="3" style="border-style: inset; font-family: 黑体;">排查<br />
                    治理<br />
                    情况</td>
                <td class="auto-style1" style="border-style: inset; font-family: 黑体;">危险源状态</td>
                <td colspan="5" style="border-style: inset; font-family: 黑体;">是否存在隐患：

                    <select name="is_danger" class="select" style="width:100px;display: inline;" id="is_danger">
                        <option value='' <if condition="$is_danger == ''">selected="selected"</if>>全部</option>
                        <option value='0' <if condition="$is_danger == 0">selected="selected"</if>>无隐患</option>
                        <option value='1' <if condition="$is_danger == 1">selected="selected"</if>>有隐患</option>
                    </select>


                </td>
                <td style="border-style: inset; font-family: 黑体;">
                    <!--    <img alt="" src="" style="height: 60px; width: 60px" id="img_1" />
                      <img alt="" src="" style="height: 60px; width: 80px" id="img2" />
                       <img alt="" src="" style="height: 60px; width: 60px" id="img3" />
                       <img alt="" src="" style="height: 60px; width: 60px" id="img4" />-->
                </td>
            </tr>
            <tr>
                <td class="auto-style1" style="border-style: inset; font-family: 黑体;">问题描述</td>
                <td colspan="5" style="border-style: inset; font-family: 黑体;">
                    <!--    <textarea id="desc" name="S2"></textarea></td>-->
                    <input id="desc" name="desc" type="text" />
                <td style="border-style: inset; font-family: 黑体;">
             <!--       <form id="upload" method='post' action="upload" enctype="multipart/form-data">-->
                        <div class="am-form-group   am-form-file">
                            <label for="doc-ipt-pwd-2" class="am-u-sm-2 am-text-sm am-text-right">缩略图地址</label>
                            <div class="am-u-sm-6 ">
                                <input type="text" id="ImgURL" name="ImgURL" placeholder="缩略图地址" class="am-input-sm"  >
                                <div class="spe-alert"></div>
                            </div>
                            <div class="am-u-sm-2 am-u-end">

                                <input id="doc-form-file" type="file" name="photo" onchange='PreviewImage(this)' multiple>
                            </div>
                            <!--   &lt;!&ndash;<input  type="submit" name="uploadimage">-->
                        </div>

                        <div class="am-form-group">
                            <div id="imgPreview" class="am-u-sm-4 am-u-sm-centered am-u-end">

                            </div>
                        </div>
                 <!--   </form>-->
</td>
            </tr>
            <tr>
                <td class="auto-style1" style="border-style: inset; font-family: 黑体;">整改措施</td>
                <td colspan="5" style="border-style: inset; font-family: 黑体;">
                    <!--     <textarea id="deal" name="S1"></textarea></td>-->
                    <input id="deal" name="deal" type="text" />
                <td style="border-style: inset; font-family: 黑体;">
                    <div class="avatar_box">   <img id="img1" src="" alt="" width="80" height="80"/><!-- 显示缩略图 -->

                    </div></td>
            </tr>
        </table>


        <input type="hidden" name="object_id" value="<{$info.object_id}>">
        <div class="row cl">
            <div class="col-10 col-offset-2">

                </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                请选择处理部门：
                <select name="is_danger" class="select" style="width:100px;display: inline;" id="Select1">
                    <option value='' <if condition="$is_danger == ''">selected="selected"</if>>选择部门</option>
                    <option value='0' <if condition="$is_danger == 0">selected="selected"</if>>安全部</option>

                </select>
                <button class="btn btn-default radius" name="piban" type="submit">&nbsp;&nbsp;批办&nbsp;&nbsp;</button>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button class="btn btn-primary radius" name="guidang" type="submit"><i class="Hui-iconfont">&#xe632;</i> 归档
            </div>
        </div>

</form>
</div>
<script type="text/javascript">
    //===【浏览文件上传地址写入文本框】开始
    $(function () {
        $('#doc-form-file').on('change', function () {
            var fileNames = '';
            $.each(this.files, function () {
                fileNames += this.name;
            });
            $('#ImgURL').val(fileNames);
        });
    });
    //===【浏览文件上传地址写入文本框】结束

    //缩略图显示方法
    function PreviewImage(imgFile) {
        var filextension = imgFile.value.substring(imgFile.value.lastIndexOf("."), imgFile.value.length);
        filextension = filextension.toLowerCase();
        if ((filextension != '.jpg') && (filextension != '.gif') && (filextension != '.jpeg') && (filextension != '.png') && (filextension != '.bmp')) {
            alert("对不起，系统仅支持标准格式的照片，请您调整格式后重新上传，谢谢 !");
            imgFile.focus();
        }
        else {
            var path;
            if (document.all)//IE
            {
                imgFile.select();
                path = document.selection.createRange().text;
                document.getElementById("imgPreview").innerHTML = "";
                document.getElementById("imgPreview").style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\"" + path + "\")";//使用滤镜效果
            }
            else//FF
            {
                path = window.URL.createObjectURL(imgFile.files[0]);// FF 7.0以上
                //path = imgFile.files[0].getAsDataURL();// FF 3.0
                document.getElementById("imgPreview").innerHTML = "<img id='img1' width='100px' height='100px' src='" + path + "'/>";
                //document.getElementById("img1").src = path;
            }
        }
    }
</script>

</body>
</html>